let arr=[
    {comment_id: 1546, user_id: 3740, comment_date: "07-03", comment_content: "好看", parent_id: null},
    {comment_id: 1547, user_id: 3740, comment_date: "07-03", comment_content: "好看", parent_id: "1"},
    {comment_id: 1548, user_id: 3740, comment_date: "07-03", comment_content: "真好看", parent_id: null},
    {comment_id: 1549, user_id: 3740, comment_date: "07-03", comment_content: "真好看", parent_id: "2"},
    {comment_id: 1556, user_id: 3751, comment_date: "07-03", comment_content: "哈哈哈哈哈", parent_id: null},
    {comment_id: 1557, user_id: 3751, comment_date: "07-03", comment_content: "affgr", parent_id: null},
    {comment_id: 1560, user_id: 3762, comment_date: "07-03", comment_content: "真好看！", parent_id: null},
    {comment_id: 1697, user_id: 3590, comment_date: "07-04", comment_content: "第三级评论", parent_id: "5"},
    {comment_id: 1702, user_id: 3650, comment_date: "07-04", comment_content: "1111111111111111111111111111111111111111111", parent_id: null},
    {comment_id: 1703, user_id: 3650, comment_date: "07-04", comment_content: "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111", parent_id: null},
    {comment_id: 1747, user_id: 3805, comment_date: "07-05", comment_content: "1231231", parent_id: "5"},
]

function fn(temp){
    let arr1 = []
    for(var i = 0; i < arr.length; i++){
        if(arr[i].parent_id == temp){
            arr1.push(arr[i])
            arr[i].child = fn(arr[i].comment_id)
        }
    }
    return arr1
}
fn(null)